package com.learn.jodd.proxetta.proxy.advice;

import jodd.proxetta.ProxyAdvice;
import jodd.proxetta.ProxyTarget;

/**
 * @author XuYang
 * @since 2025/6/10 15:27
 */
public class CustomAdvice
    implements ProxyAdvice
{
    @Override
    public Object execute() throws Exception {
        System.out.println("当前参数数量: " + ProxyTarget.argumentsCount());
        System.out.println("被代理类类型: " + ProxyTarget.targetClass());
        System.out.println("方法名称: " + ProxyTarget.targetMethodName());
        System.out.println("返回值类类型: " + ProxyTarget.returnType());
        return ProxyTarget.invoke();
    }
}
